package flatlandRPG;

import java.awt.geom.Rectangle2D;
import org.lwjgl.util.vector.Vector2f;

// -------------------------------------------------------------------------
/**
 * An interface to define objects that can move, and properly detect their
 * collision with solid objects.
 *
 * @author evant
 * @version Apr 17, 2011
 */
public interface IMoveable
{
    // ----------------------------------------------------------
    /**
     * Moves the object by the given direction vector.
     *
     * @param direction
     *            the direction vector
     */
    void move(Vector2f direction);


    // ----------------------------------------------------------
    /**
     * The object reacts when it collides with a solid object.
     * @param solid the object that was collided against
     */
    void collision(ISolid solid);


    // ----------------------------------------------------------
    /**
     * Returns the points the movable object for use in collision.
     *
     * @return an array of points of the object
     */
    Rectangle2D getBounds();

    /**
     * Gets the current position of the object, to make it easier for collision
     * to get the collision vector.
     *
     * @return the present location of the object
     */
    Vector2f getLocation();
}
